﻿using System.Windows.Controls;
using System.Windows.Input;
using HandyControl.Controls;
using WWLauncher.Interface;
using WWLauncher.ViewModel;

namespace WWLauncher.View.UserControls.Config
{
    /// <summary>
    /// Debug设置
    /// </summary>
    public partial class DebugControl : UserControl, IChildrenWindow
    {
        private readonly DebugConfig Config = MainViewModel.Instance().AppConfig.DebugConfig;
        public MainWindow ParentWindow { get; set; }

        public DebugControl()
        {
            this.DataContext = Config;
            InitializeComponent();
        }

        /// <summary>
        /// 移动窗口
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DragMove(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (e.LeftButton == MouseButtonState.Pressed)
            {
                Window.GetWindow(this).DragMove();
            }
        }
    }
}
